<template>
  <div class="tip">
    <el-row type="flex" justify="space-between" align="middle" class="border-base">
      <el-col><span>{{this.title}}</span></el-col>
      <el-col class="no-print" >
        <el-button size="small" v-if="hasGoBack" type="primary" icon="el-icon-back" @click="goBack">返回</el-button>
        <el-button size="small" v-if="hasRefresh" type="primary" icon="el-icon-refresh" @click="refreshPage">刷新</el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    name: "jxf-titletip",
    props: {
      title:{
        type:String,
        default:""
      },
      hasGoBack:{
        type:Boolean,
        default: false
      },
      hasRefresh:{
        type:Boolean,
        default: true
      }
    },
    methods:{
      goBack(){
        this.$emit("goBack")
      },
      refreshPage(){
        this.$emit("refreshPage")
      }
    }
  }
</script>

<style lang="scss" scoped>
  .tip{
    .el-row{
      border-left: 4px solid;
      padding-left: 15px;
    }
    .el-col{
      width: auto;
    }
  }
</style>
